import React from 'react'

import {BrowserRouter,Switch,Route,Redirect} from 'react-router-dom'

import Login from '../views/login'
import Registry from '../views/registry'
import Main from '../views/main'

function Router(){
    return <BrowserRouter>
        <Switch>
            <Route path="/login" component={Login}></Route>
            <Route path="/registry" component={Registry}></Route>
            <Route path="/main" component={Main}></Route>
            <Redirect from="/" to="/main"></Redirect>
        </Switch>
    </BrowserRouter>
}

export default Router